#coding:utf-8
import unittest
import calc
import HTMLTestRunner
class  CalcTest(unittest.TestCase):
    def test_common(self):
        self.assertEqual(calc.largest([1,2,3,8]),8)
    def test_max_in_left(self):
        self.assertEqual(calc.largest([78,1,2,54,63]),78)
    def  test_null_value(self):        
        self.assertEqual(calc.largest([]),None)
    def test_negative_value(self):
        self.assertEqual(calc.largest([-1,2,3,-8]),3)
if __name__ == '__main__':
    suite = unittest.TestSuite()
    suite.addTest(CalcTest("test_max_in_left"))
    runner = HTMLTestRunner.HTMLTestRunner(open('test_result.html','w'),title=u"测试报告")
    runner.run(suite)
